import Vue from "vue";
import Vuex from 'vuex'
import persistence from "vuex-uniapp-persistence";
import user from './user'
import address from './address'
Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        // 安全区域
        safeArea: uni.getSystemInfoSync().safeArea,
        // 胶囊信息
        capsuling: uni.getMenuButtonBoundingClientRect(),
        // 操作平台信息
        platform: uni.getSystemInfoSync().platform
    },
    getters: {},
    mutations: {

    },
    modules: { user, address },
    // 本地储存的插件配置
    plugins: [persistence()],
})
export default store